/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui2android7cui.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui2android7cui.*;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class Adaptedaui2android7cuiFactoryImpl extends EFactoryImpl implements Adaptedaui2android7cuiFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static Adaptedaui2android7cuiFactory init() {
		try {
			Adaptedaui2android7cuiFactory theAdaptedaui2android7cuiFactory = (Adaptedaui2android7cuiFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.fit.hcmus.edu.vn/se/mdd/mbuid/adaptedaui2android7cui"); 
			if (theAdaptedaui2android7cuiFactory != null) {
				return theAdaptedaui2android7cuiFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new Adaptedaui2android7cuiFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Adaptedaui2android7cuiFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case Adaptedaui2android7cuiPackage.ACTION: return createAction();
			case Adaptedaui2android7cuiPackage.PRESENTATION_UNIT: return createPresentationUnit();
			case Adaptedaui2android7cuiPackage.ABSTRACT_UI_COMPONENT: return createAbstractUIComponent();
			case Adaptedaui2android7cuiPackage.INPUT_FIELD: return createInputField();
			case Adaptedaui2android7cuiPackage.OUTPUT_FIELD: return createOutputField();
			case Adaptedaui2android7cuiPackage.MULTIPLE_CHOICE: return createMultipleChoice();
			case Adaptedaui2android7cuiPackage.SINGLE_CHOICE: return createSingleChoice();
			case Adaptedaui2android7cuiPackage.NAVIGATOR: return createNavigator();
			case Adaptedaui2android7cuiPackage.ACTIVATOR: return createActivator();
			case Adaptedaui2android7cuiPackage.PRESENTATION_SYSTEM: return createPresentationSystem();
			case Adaptedaui2android7cuiPackage.UI_CONTAINER_RELATIONSHIP: return createUIContainerRelationship();
			case Adaptedaui2android7cuiPackage.UI_TEMPORAL_RELATIONSHIP: return createUITemporalRelationship();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object createFromString(EDataType eDataType, String initialValue) {
		switch (eDataType.getClassifierID()) {
			case Adaptedaui2android7cuiPackage.PRESENTATION_UNIT_IMPLEMENTATION:
				return createPresentationUnitImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.ABSTRACT_UI_COMPONENT_IMPLEMENTATION:
				return createAbstractUIComponentImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.INPUT_FIELD_IMPLEMENTATION:
				return createInputFieldImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.OUTPUT_FIELD_IMPLEMENTATION:
				return createOutputFieldImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.MULTIPLE_CHOICE_IMPLEMENTATION:
				return createMultipleChoiceImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.SINGLE_CHOICE_IMPLEMENTATION:
				return createSingleChoiceImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.NAVIGATOR_IMPLEMENTATION:
				return createNavigatorImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.ACTIVATOR_IMPLEMENTATION:
				return createActivatorImplementationFromString(eDataType, initialValue);
			case Adaptedaui2android7cuiPackage.TEMPORAL_OPERATOR:
				return createTemporalOperatorFromString(eDataType, initialValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String convertToString(EDataType eDataType, Object instanceValue) {
		switch (eDataType.getClassifierID()) {
			case Adaptedaui2android7cuiPackage.PRESENTATION_UNIT_IMPLEMENTATION:
				return convertPresentationUnitImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.ABSTRACT_UI_COMPONENT_IMPLEMENTATION:
				return convertAbstractUIComponentImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.INPUT_FIELD_IMPLEMENTATION:
				return convertInputFieldImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.OUTPUT_FIELD_IMPLEMENTATION:
				return convertOutputFieldImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.MULTIPLE_CHOICE_IMPLEMENTATION:
				return convertMultipleChoiceImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.SINGLE_CHOICE_IMPLEMENTATION:
				return convertSingleChoiceImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.NAVIGATOR_IMPLEMENTATION:
				return convertNavigatorImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.ACTIVATOR_IMPLEMENTATION:
				return convertActivatorImplementationToString(eDataType, instanceValue);
			case Adaptedaui2android7cuiPackage.TEMPORAL_OPERATOR:
				return convertTemporalOperatorToString(eDataType, instanceValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Action createAction() {
		ActionImpl action = new ActionImpl();
		return action;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PresentationUnit createPresentationUnit() {
		PresentationUnitImpl presentationUnit = new PresentationUnitImpl();
		return presentationUnit;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AbstractUIComponent createAbstractUIComponent() {
		AbstractUIComponentImpl abstractUIComponent = new AbstractUIComponentImpl();
		return abstractUIComponent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InputField createInputField() {
		InputFieldImpl inputField = new InputFieldImpl();
		return inputField;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OutputField createOutputField() {
		OutputFieldImpl outputField = new OutputFieldImpl();
		return outputField;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MultipleChoice createMultipleChoice() {
		MultipleChoiceImpl multipleChoice = new MultipleChoiceImpl();
		return multipleChoice;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SingleChoice createSingleChoice() {
		SingleChoiceImpl singleChoice = new SingleChoiceImpl();
		return singleChoice;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Navigator createNavigator() {
		NavigatorImpl navigator = new NavigatorImpl();
		return navigator;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Activator createActivator() {
		ActivatorImpl activator = new ActivatorImpl();
		return activator;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PresentationSystem createPresentationSystem() {
		PresentationSystemImpl presentationSystem = new PresentationSystemImpl();
		return presentationSystem;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UIContainerRelationship createUIContainerRelationship() {
		UIContainerRelationshipImpl uiContainerRelationship = new UIContainerRelationshipImpl();
		return uiContainerRelationship;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UITemporalRelationship createUITemporalRelationship() {
		UITemporalRelationshipImpl uiTemporalRelationship = new UITemporalRelationshipImpl();
		return uiTemporalRelationship;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PresentationUnitImplementation createPresentationUnitImplementationFromString(EDataType eDataType, String initialValue) {
		PresentationUnitImplementation result = PresentationUnitImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertPresentationUnitImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AbstractUIComponentImplementation createAbstractUIComponentImplementationFromString(EDataType eDataType, String initialValue) {
		AbstractUIComponentImplementation result = AbstractUIComponentImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertAbstractUIComponentImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InputFieldImplementation createInputFieldImplementationFromString(EDataType eDataType, String initialValue) {
		InputFieldImplementation result = InputFieldImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertInputFieldImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OutputFieldImplementation createOutputFieldImplementationFromString(EDataType eDataType, String initialValue) {
		OutputFieldImplementation result = OutputFieldImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertOutputFieldImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MultipleChoiceImplementation createMultipleChoiceImplementationFromString(EDataType eDataType, String initialValue) {
		MultipleChoiceImplementation result = MultipleChoiceImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertMultipleChoiceImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SingleChoiceImplementation createSingleChoiceImplementationFromString(EDataType eDataType, String initialValue) {
		SingleChoiceImplementation result = SingleChoiceImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertSingleChoiceImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NavigatorImplementation createNavigatorImplementationFromString(EDataType eDataType, String initialValue) {
		NavigatorImplementation result = NavigatorImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertNavigatorImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivatorImplementation createActivatorImplementationFromString(EDataType eDataType, String initialValue) {
		ActivatorImplementation result = ActivatorImplementation.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertActivatorImplementationToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TemporalOperator createTemporalOperatorFromString(EDataType eDataType, String initialValue) {
		TemporalOperator result = TemporalOperator.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertTemporalOperatorToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Adaptedaui2android7cuiPackage getAdaptedaui2android7cuiPackage() {
		return (Adaptedaui2android7cuiPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static Adaptedaui2android7cuiPackage getPackage() {
		return Adaptedaui2android7cuiPackage.eINSTANCE;
	}

} //Adaptedaui2android7cuiFactoryImpl
